package com.zlaidyrac.weride.ui;

import java.util.ArrayList;
import java.util.HashMap;

import com.zlaidyrac.weride.main.R;

import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Intent;
import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Log;
import android.widget.ListView;
import android.widget.SimpleAdapter;

public class MyPassengersActivity extends Activity {
	HashMap<String,String> userDetails;
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.my_passengers);

		ArrayList<HashMap> places = new ArrayList<HashMap>();

		Intent intent = getIntent();
		ArrayList<HashMap<String, String>> mylist = (ArrayList<HashMap<String, String>>) intent
				.getSerializableExtra("maps");

		ListView maps = (ListView) findViewById(R.id.list);
		SimpleAdapter rideShedule = new SimpleAdapter(this, mylist,
				R.layout.my_passengers_list, new String[] { "name", "contact_no", },
				new int[] { R.id.NAME_CELL, R.id.CONTACT_NO_CELL });
		maps.setAdapter(rideShedule);
	}
	private class GetUserAsyncTask extends AsyncTask<String,Void, Boolean > {
		protected ProgressDialog progressDialog;
		@Override
		protected void onPreExecute() {
			super.onPreExecute();
			progressDialog = ProgressDialog.show(MyPassengersActivity.this, "Loading Details", "Please wait...", true, false);
		}
		@Override
		protected Boolean doInBackground(String... params) {
			// TODO Auto-generated method stub
			return null;
		}
		@Override
		protected void onPostExecute(Boolean success) {
			super.onPostExecute(success);
			if ( success ) {
				progressDialog.dismiss();
			}
			else {
				Log.e("Web Service", "Could not retrive Rider data");
			}
		}
		
	}
}
